package com.zy.openchat.core.model.message;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

public class InlineKeyboardButtonType implements Parcelable {

    @SerializedName(value = "@type")
    public String type;
    public String url;


    public InlineKeyboardButtonType(String type, String url) {
        this.type = type;
        this.url = url;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.type);
        dest.writeString(this.url);
    }

    public void readFromParcel(Parcel source) {
        this.type = source.readString();
        this.url = source.readString();
    }

    protected InlineKeyboardButtonType(Parcel in) {
        this.type = in.readString();
        this.url = in.readString();
    }

    public static final Parcelable.Creator<InlineKeyboardButtonType> CREATOR = new Parcelable.Creator<InlineKeyboardButtonType>() {
        @Override
        public InlineKeyboardButtonType createFromParcel(Parcel source) {
            return new InlineKeyboardButtonType(source);
        }

        @Override
        public InlineKeyboardButtonType[] newArray(int size) {
            return new InlineKeyboardButtonType[size];
        }
    };
}
